<template>
	<label class="input-single-checkbox" >
		<input type="radio" name="type" @click="select" :checked="value" />
		<div class="img"></div>
		<slot></slot>
	</label>
</template>

<script>
	export default {
		props: {
			value: {
				default: false
			}
		},
		data() {
			return {

			}
		},
		methods: {
			select() {
				console.log(1)
				this.$emit('input',!this.value);
				this.$nextTick(()=>{
					
//					console.log(this.value)
				})
			}
		}
	}
</script>

<style lang="less">
	@import '../../less/base/base.less';
	.input-single-checkbox {
		position: relative;
		width: auto;
		display: inline-block;
		text-align: center;
		.img {
			width: 14px;
			height: 14px;
			background-image: url("./ic_selectbox_register_nor@2x.png");
			background-size: 100%;
			display: inline-block;
			vertical-align: middle;
			margin-right: 6px;
		}
		span {
			vertical-align: middle;
			font-size: 14px;
			color: @color-txt1;
		}
		input {
			position: absolute;
			width: 100%;
			height: 100%;
			opacity: 0.01;
			left: 0;
			top: 0;
		}
		input:checked+.img {
			background-image: url("./ic_selectbox_register_sel@2x.png");
		}
	}
</style>